package com.huluobo.a2207douyindemo.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.a2207douyindemo.R;
import com.huluobo.a2207douyindemo.utils.ImageUtils;
import com.huluobo.base.bean.ShopBeanResult;

/**
 * Created by LC on 2024/9/26.
 */
public class ShopAdapter extends BaseQuickAdapter<ShopBeanResult.ShopBean, BaseViewHolder> {
    public ShopAdapter() {
        super(R.layout.item_shop);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, ShopBeanResult.ShopBean shopBean) {
        ImageUtils.getInstance().loadImage(getContext(), shopBean.getGoods_default_icon(),
                baseViewHolder.getView(R.id.item_shop_goods_icon_iv));
        baseViewHolder.setText(R.id.item_shop_desc_tv, shopBean.getGoods_desc());
        baseViewHolder.setText(R.id.item_shop_price_tv, shopBean.getGoods_default_price() + "元");
    }
}
